function [QStep3,theta1Step3Opt,outputStep3,setupStep3] = ...
    step3SR_theta11(theta12Step3,namesTheta12,theta1Step1Opt,setupStep1,upperBounds,lowerBounds,Insigma,optim)

setupStep1.optimizer  = optim.optimizer;
theta1Step3           = theta1Step1Opt;
theta1Step3           = rmfield(theta1Step3,namesTheta12);
calibrateTheta1Step3  = setupStep1.calibrateTheta1;
for i=1:length(namesTheta12)
    calibrateTheta1Step3.(namesTheta12{i}) = theta12Step3.(namesTheta12{i});
end
% Setting the setup3Step
setupStep3                   = setupStep1;
setupStep3.selectTheta1      = fieldnames(theta1Step3);
setupStep3.calibrateTheta1   = calibrateTheta1Step3;
setupStep3.upperBoundsValues = struc2values(upperBounds,setupStep3.selectTheta1);
setupStep3.lowerBoundsValues = struc2values(lowerBounds,setupStep3.selectTheta1);
setupStep3.InsigmaValues     = struc2values(Insigma,setupStep3.selectTheta1);
setupStep3.optimizer         = optim.optimizer;

% The optimization
[QStep3,theta1Step3Opt,outputStep3] = step1SR(theta1Step3,setupStep3,optim);

end

